﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data.SqlClient;
using System.Data;
using Maticsoft.DBUtility;

namespace EnterpriseFund.DAL
{
    public class PrvUserGroup
    {

        /// <summary>
        /// 获取组列表，根据用户登录号和公司编号
        /// </summary>
        /// <param name="strLogId"></param>
        /// <param name="strEntityNo"></param>
        /// <returns></returns>
        public List<string> getListbyFlogidAndEntityNo(string strLogId, string strEntityNo)
        {
            StringBuilder strSql = new StringBuilder();
            strSql.Append("select FGroupNo ");
            strSql.Append(" FROM t_PrvUserGroup ");
            strSql.Append(" where FEntityNo=@FEntityNo and FLogID=@FLogID");
            SqlParameter[] parameters =  { 
               new SqlParameter("@FEntityNo",SqlDbType.VarChar,50),
                new SqlParameter("@FLogID",SqlDbType.VarChar,50)
            };

            parameters[0].Value = strEntityNo;
            parameters[1].Value = strLogId;

            return DbHelperSQL.getListString(strSql.ToString(), parameters);
        }


    }
}
